<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
       * {
    margin: 0;
    padding: 0;
}


.container{
    /* margin-top: ; */
    /* border: 1px solid red; */
    perspective: 800px;
    perspective-origin: top right;
    width: 400px;
    height: 400px;
    /* margin: 400px ; */
    
    
}

.cube{
    
    position: absolute;
    width: 200px;
    height: 200px;
    transform-style: preserve-3d;
    margin: auto;
    left: 70%;
    top: 80%;
    transform: translate(-50%,-50%);
    animation: move 10s linear infinite;

}
.side{
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.6;
    border: 2px solid white;
    text-align: center;
    line-height: 200px;
}

.front {
    /* background-color: #d50000; */
    transform: translateZ(100px);
    background: url(../img/girl.jpg) no-repeat;
    background-size: 100%;
}

.back {
    background-color: #aa00ff;
    transform:  translateZ(-100px);
    
}

.left {
    background-color: #304ffe;
    transform: translateX(-100px) rotateY(-90deg);
}

.right {
    background-color: #0091ea;
    transform: translateX(100px) rotateY(90deg);
}

.top {
    background-color: #00bfa5;
    transform: translateY(-100px) rotateX(90deg);
}

.bottom {
    background-color: #64dd17;
    transform: translateY(100px) rotateX(-90deg);
}

@keyframes move {
    from {
        transform: translate(-50%, -50%) rotateY(0deg) rotateX(720deg) rotateZ(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotateY(360deg) rotateX(0deg) rotateZ(360deg);
    }
}

    </style>
</head>
<body>
    <div class="forth">
        <div class="dropbtn">
            <a href="#">
                CSS动画
            </a>
        
        <div class="dropdown-content">
            <a href="../图6.jpg" style="margin-top: 10px;">立方体</a>
            <!-- <a href="">2</a>
            <a href="">3</a> -->
        </div>
    </div>
    </div>

    


</div>


<div class="container">
    <div class="cube">
        <div class="side front"></div>
        <div class="side left">左</div>
        <div class="side right">右</div>
        <div class="side back">后</div>
        <div class="side top">顶</div>
        <div class="side bottom">底</div>
    </div>
</div> 
</body>
</html>